/*  SSSelectionView.m
 *  MESLib
 * 
 * Copyright 2003-2009 Starline Software Ltd
 * 
 * This file is part of MESLib.
 * 
 * MESLib is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MESLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with MESLib. If not, see <http://www.gnu.org/licenses/>.
 */
//  Created by Tobias Haughton on Wed Feb 19 2003.
//  Copyright (c) 2003 Starline Software. All rights reserved.
//

#import "SSSelectionView.h"
#import "SSChartView.h"

@implementation SSSelectionView

- (id)initWithFrame:(NSRect)frame {
   self = [super initWithFrame:frame];
   if (self) {
   }
   return self;
}

- (void)drawRect:(NSRect)rect {
   NSRect selectedRect = [(SSChartView *)[self superview] selectionRect];

   if (!NSIsEmptyRect(selectedRect)) {
      [[NSColor blackColor] set];
      NSFrameRect(selectedRect);

      [[NSColor colorWithCalibratedRed:.1 green:.4 blue:1 alpha:.1] set];
      [NSBezierPath fillRect:selectedRect];
   }
}

- (NSView *)hitTest:(NSPoint)aPoint
{
   return nil;
}

- (BOOL)isFlipped
{
   return YES;
}

@end
